package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectAssetDetailEntityMapper;
import com.ly.heart.domain.ProjectAssetDetailEntity;
import com.ly.heart.service.IProjectAssetDetailEntityService;

/**
 * 项目机具/资产借还明细记录Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectAssetDetailEntityServiceImpl implements IProjectAssetDetailEntityService
{
    @Autowired
    private ProjectAssetDetailEntityMapper projectAssetDetailEntityMapper;

    /**
     * 查询项目机具/资产借还明细记录
     *
     * @param id 项目机具/资产借还明细记录主键
     * @return 项目机具/资产借还明细记录
     */
    @Override
    public ProjectAssetDetailEntity selectProjectAssetDetailEntityById(String id)
    {
        return projectAssetDetailEntityMapper.selectProjectAssetDetailEntityById(id);
    }

    /**
     * 查询项目机具/资产借还明细记录列表
     *
     * @param projectAssetDetailEntity 项目机具/资产借还明细记录
     * @return 项目机具/资产借还明细记录
     */
    @Override
    public List<ProjectAssetDetailEntity> selectProjectAssetDetailEntityList(ProjectAssetDetailEntity projectAssetDetailEntity)
    {
        return projectAssetDetailEntityMapper.selectProjectAssetDetailEntityList(projectAssetDetailEntity);
    }

    /**
     * 新增项目机具/资产借还明细记录
     *
     * @param projectAssetDetailEntity 项目机具/资产借还明细记录
     * @return 结果
     */
    @Override
    public int insertProjectAssetDetailEntity(ProjectAssetDetailEntity projectAssetDetailEntity)
    {
        projectAssetDetailEntity.setCreateTime(DateUtils.getNowDate());
        return projectAssetDetailEntityMapper.insertProjectAssetDetailEntity(projectAssetDetailEntity);
    }

    /**
     * 修改项目机具/资产借还明细记录
     *
     * @param projectAssetDetailEntity 项目机具/资产借还明细记录
     * @return 结果
     */
    @Override
    public int updateProjectAssetDetailEntity(ProjectAssetDetailEntity projectAssetDetailEntity)
    {
        return projectAssetDetailEntityMapper.updateProjectAssetDetailEntity(projectAssetDetailEntity);
    }

    /**
     * 批量删除项目机具/资产借还明细记录
     *
     * @param ids 需要删除的项目机具/资产借还明细记录主键
     * @return 结果
     */
    @Override
    public int deleteProjectAssetDetailEntityByIds(String[] ids)
    {
        return projectAssetDetailEntityMapper.deleteProjectAssetDetailEntityByIds(ids);
    }

    /**
     * 删除项目机具/资产借还明细记录信息
     *
     * @param id 项目机具/资产借还明细记录主键
     * @return 结果
     */
    @Override
    public int deleteProjectAssetDetailEntityById(String id)
    {
        return projectAssetDetailEntityMapper.deleteProjectAssetDetailEntityById(id);
    }
}
